package com.xt.purchasingsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xt.purchasingsystem.mapper.SupplierRecommendDetailMapper;
import com.xt.purchasingsystem.model.SupplierRecommendDetail;
import com.xt.purchasingsystem.service.SupplierRecommendDetailService;
import com.xt.purchasingsystem.utils.Result;
import com.xt.purchasingsystem.utils.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
@Service
@Transactional
public class SupplierRecommendDetailServiceImpl extends ServiceImpl<SupplierRecommendDetailMapper, SupplierRecommendDetail> implements SupplierRecommendDetailService {

    @Autowired
    private SupplierRecommendDetailMapper supplierRecommendDetailMapper;
    @Override
    public Result getAllSupplierRecommendDetailByProductId(String productId) {
        List<SupplierRecommendDetail> allSupplierRecommendDetailByProductId = supplierRecommendDetailMapper.getAllSupplierRecommendDetailByProductId(productId);
        return ResultFactory.buildSuccessResult("查询成功",allSupplierRecommendDetailByProductId);
    }
}
